const express=require("express")
const router=express.Router()
const deleteArticle=require("../service/deleteArticle.js")
router.get("/deleteArticle/:id",(req,res)=>{
    let id=req.params.id
    deleteArticle(id).then(data=>{
        if(data==404){
            res.json({
                status:data,
                msg:"删除失败"
            })
            res.end()
        }else{
            res.json({
                status:200,
                msg:"删除成功"
            })
            res.end()
        }
    })
})
module.exports=router